<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .aaa{
      outline: 1px solid red;
      transition: all 0.5s;
      /*  height: 10px;  */
      height: calc-size(300px);
    }
  </style>
  <script>
    function toggle () {
      console.log( 11111111111 );
      let aaa = document.querySelector('.aaa');
      console.log( aaa.style.height );
    }
  </script>
</head>
<body>
  <button onclick="toggle()">toggle</button>
  <div class="aaa">
    <p>21111111111111111</p>
  </div>
</body>
</html>